package com.naiterui.ehp.bs.doctor.repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bp.domain.Login;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @Description TODO
 * @Author gongbaoqiang
 * @Date 2020/4/9 5:39 PM
 */
@Repository
public interface ILoginRepository extends BaseJpaRepository<Login, Long> {

    Page<Login> findByLastLoginTimeIsNullAndCreatedAtBetween(Date start, Date end, Pageable pageable);

    long countByPhoneNum(String phoneNum);

    List<Login> findByPhoneNum(String phoneNum);

    long countBySaltOrRecommCode(String salt, String recommCode);

}
